package day06;
import java.util.Arrays;
public class Day06HomeWork01 {
    public static void main(String[] args) {

        int[] arr=new int[10];
        for (int i=0;i<arr.length;i++){
            arr[i]=(int)(Math.random()*100);
        }
        int max=arr[0];
        Arrays.sort(arr);
        for(int i=1;i<arr.length;i++){
            if(max<arr[i]){
                max=arr[i];
            }
        }
        arr=Arrays.copyOf(arr,arr.length+1);
        arr[arr.length-1]=max;

        //=================================================
        say();

        sayHi("李明");

        sayHello("李明",30);

        double b=getNum();
        System.out.println(b);

        System.out.println(getPlus(4,6));

        int[] arr1=testArray(5,100);
        for (int i=0;i<arr.length;i++){
            System.out.println(arr[i]);
        }
    }
    public static void say(){
        System.out.println("你好");
    }
    public static void sayHi(String name){
        System.out.println(name);

    }
    public static void sayHello(String name,int age){
        System.out.println("名字："+name+"年龄："+age);
    }
    public static double getNum (){
        double a=1.7;
        return a;
    }
    public static int getPlus(int a,int b){
        int c=a*b;
        return c;
    }
    public static int[] testArray(int m,int num){
        int[] a=new int[m];
        for (int i=0;i<a.length;i++){
            a[i]=(int) (Math.random()*(num+1));
        }
    return a;
    }
}
